<?php
namespace app\websocket\listener;

class SwooleWebsocketOpen{
    public function handle(\think\Request $request)
    {
        $sw = app("think\swoole\Websocket");
        $sender = $sw->getSender();
        echo "New connection from {$sender}\n";

        // $request->get('room');

        // $sw->join($request->get('room'));
    }
}